package com.ljw.miniweb.money.dao;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;


import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.ljw.miniweb.dbconn.MyAppSqlConfig;
import com.ljw.miniweb.money.bean.MoneyBean;

@Repository("moneyDao")
public class MoneyDaoImpl implements MoneyDao {
	
	Log logger = LogFactory.getLog(this.getClass());
	SqlMapClient sqlMap = MyAppSqlConfig.getSqlMapInstance();
	
	public ArrayList getMoneyList() throws SQLException {
		ArrayList<MoneyBean> list = (ArrayList<MoneyBean>)sqlMap.queryForList("getMoneyList");
		return list;
	}
	
	public void insertMoney(MoneyBean moneyBean)throws SQLException{
		sqlMap.queryForList("insertMoney", moneyBean);
	}
}
